<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of email
 *
 * @author ZzNinjakyozZ
 */
class Email extends CI_Model{
    //put your code here
    function __construct() {
        parent::__construct();
    }
    function sendmail($Receiver, $Subject, $Content){
        $config = Array(
        'protocol' => 'smtp',
        'smtp_host' => 'ssl://smtp.googlemail.com',
        'smtp_port' => 465,
        'smtp_user' => 'testheavenjobs1@gmail.com',
        'smtp_pass' => 'heavenjobs',
        'mailtype'  => 'html', 
        'charset'   => 'iso-8859-1'
        );
        $this->load->library('email', $config);
        $this->email->set_newline("\r\n");
        
        $this->email->from('testheavenjobs1@gmail.com', 'Heaven Job');
        $this->email->to($Receiver); 
        
        $this->email->subject($Subject);
        $this->email->message($Content);  
        
        $result = $this->email->send();
    }
}

?>